Learning Objectives

After completing this lesson, you'll be able to:

Video

Resources

Introduction

Another common use of coordinates is to build lines from a series of points. In this lesson, you'll learn how to use the LineBuilder transformer to create a line from points.

Exercise

  1. Open FME Workbench 2022.0 or later.
  2. Repeat the steps from Exercise: Turn Coordinates into Geometry using Reader Parameters or Exercise: Turn Coordinates into Geometry Using the VertexCreator Transformer to create points from the new rapid_transit_line.csv file. Its coordinate system is also UTM83-10.
  3. Add a LineBuilder transformer to the canvas, connecting it to either the CSV reader or the VertexCreator, depending on the method you chose to get the points.
  4. In the LineBuilder parameters, enable Group Processing and set the Group By parameter to LINE. This tells the LineBuilder to stop connecting the points when the LINE attribute changes. This will result in three different lines in this example. If your lines are not coming out as expected, you may be required to sort by a particular attribute to organize the data by using the Sorter. In FME 2018 or older, the Group By option is not available. Use the Connection Break Attribute instead.Group By LINE
  5. Run the workspace and inspect the output.

Results

LineBuilder results on a mapThe output of lines using any of the three methods and a LineBuilder transformer. Stylized in FME Data Inspector using map tiles by Stamen Design, under CC-BY-3.0. Data by OpenStreetMap, under CC-BY-SA.